{% extends 'layout/base.html' %}
{% load static %}
{% block userInfo %}
<div id="user_id" data="{{user.id}}" class="fly-home fly-panel" style="background-image: url();">
  <img src="{{user.avatar}}" alt="{{user.username}}">
  <h1>
    {{user.username}}
    {% if user.sex == 'male' %}
    <i class="iconfont icon-nan"></i>
    {% else %}
    <i class="iconfont icon-nv"></i>
    {% endif %}

    {% if user.is_staff %}
    <span>（管理员）</span>
    {% endif %}
  </h1>

  <p class="fly-home-info">
    <span style="color: #FF7200;">财富 {{user.jifen}}</span>
    <i class="iconfont icon-shijian"></i><span>{{user.date_joined}} 加入</span>
  </p>

  <p class="fly-home-sign">{{user.qianming}}</p>
  {% if user.id == request.user.id %}
  <div class="fly-sns">
    <a href="{% url 'postAdd' %}" class="layui-btn layui-btn-primary fly-imActive" data-type="addFriend">写笔记</a>
    <a href="/note-list?user_id={{user.id}}" class="layui-btn layui-btn-green" data-type="chat">我的笔记</a>
  </div>
  {% else %}
  <a href="/note-list?user_id={{user.id}}" style="margin-top: 15px;" class="layui-btn layui-btn-primary"
    data-type="addFriend">ta的笔记</a>
  {% endif %}
</div>

{% endblock %}

{% block right_content %}
<div class="layui-container">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md6 fly-home-jie">
      <div class="fly-panel">
        <h3 class="fly-panel-title">{{user.username}} 最近的笔记</h3>
        <ul id='user_article' class="jie-row">
          <!-- <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><i style="font-size:14px;">没有发表任何求解</i></div> -->
        </ul>
        <div style="text-align: center;padding: 10px 0;color: grey;"><button id="moreArticle" type="button" class="layui-btn layui-btn-primary">加载更多</button></div>
      </div>
    </div>

    <div class="layui-col-md6 fly-home-da">
      <div class="fly-panel">
        <h3 class="fly-panel-title">{{user.username}} 最近参与的评论</h3>
        <ul id='user_comment' class="home-jieda">

          <!-- <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><span>没有回答任何问题</span></div> -->
        </ul>
        <div style="text-align: center;padding: 10px 0;color: grey;"><button id="moreComment"  type="button" class="layui-btn layui-btn-primary">加载更多</button></div>
      </div>
    </div>
  </div>
</div>
{% endblock %}

{% block script %}
<script src="{% static 'index/js/account.js' %}"></script>
{% endblock %}